/*
 * Copyright 2008 p.langer
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * 	http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package at.ac.tuwien.big.easyholdem.game;

import java.util.Collection;

/**
 * <p>
 * An abstract state of a easy hold'em game.
 * </p>
 * 
 * <p>
 * Created on 16.01.2008 at 15:46:45.
 * </p>
 * 
 * @author Philip Langer <langer[at]big[dot]tuwien[dot]ac[dot]at>
 */
public abstract class GameState {

	private Game game;

	/**
	 * Default constructor specifiing the game this state is for.
	 * 
	 * @param game
	 *            game this state is for.
	 */
	protected GameState(Game game) {
		this.game = game;
	}

	/**
	 * Reaturns the game this state is for.
	 * 
	 * @return the game
	 */
	protected final Game getGame() {
		return game;
	}

	/**
	 * Returns the state.
	 * 
	 * @return the state.
	 */
	protected abstract State getState();

	/**
	 * Return the actions that are possible in this state.
	 * 
	 * @return possible actions.
	 */
	protected abstract Collection<Action> getPossibleActions();

	/**
	 * Executes the specified <code>actionToAct</code>.
	 * 
	 * @param actionToAct
	 *            action to execute.
	 */
	protected abstract void act(Action actionToAct);

}
